package Test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Arrays;

public class ReadFileUsingScanner{
	public static void main(String[] args)  throws FileNotFoundException{
		Scanner in = new Scanner(new File("身份证号.txt"));//为myfile.txt这个File创建一个扫描器in
		while(in.hasNextLine()){
			String line = in.nextLine();//读出myfile.txt的下一行
			
			Scanner lineScanner = new Scanner(line);//为每一行建立一个扫描器
			//System.out.println("lineScanner="+lineScanner);
			lineScanner.useDelimiter(" ");//使用空格作为分隔符
			//System.out.println(line);
			String a1 = lineScanner.next();//姓名
			String a2 = lineScanner.next();//身份证号
			String a3 = lineScanner.next();//性别
			String a4 = lineScanner.next();//年龄
			String a5 = lineScanner.next();//地址
			while(lineScanner.hasNext()){//谨防地址只有一段
				a5 += lineScanner.next();
			}
			System.out.println(a1+a2+a3+a4+a5);
		}
		in.close();
	}
}